/*
 * @Author: wangming
 * @Date: 2021-04-14 18:45:04
 * @LastEditors: wangming
 * @LastEditTime: 2022-08-02 11:53:55
 * @Description: file content
 */
import myMixin from "@/pageComponents/myMixin";
export default {
  mixins: [myMixin],
  render() {
    let {
      width,
      content,
      href,
      target,
      type,
      disabled,
      underline,
    } = this.config.__config;
    if (!/^http:\/\//.test(href) && !/^https:\/\//.test(href)) {
      href = "http://" + href;
    }
    return (
      <div
        class="dib"
        style={{
          width: width + "%",
        }}
      >
        <el-link
          href={href}
          target={target}
          type={type || "primary"}
          disabled={disabled}
          underline={underline}
        >
          {content}
        </el-link>
      </div>
    );
  },
};
